package com.cskaoyan.config;

import org.apache.shiro.authz.AuthorizationException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
public class ExceptionControllerAdvise {

    @ExceptionHandler(AuthorizationException.class)
    @ResponseBody
    public String handlerAuthorException(Exception e){
        return "noway";
    }


    @ExceptionHandler(Exception.class)
    @ResponseBody
    public String handlerException(Exception e){
        return "noway";
    }
}
